<?php

/*
 * This file is part of PHP CS Fixer.
 *
 * (c) wangyt <wangtom365@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace App\Providers;

use App\Http\Formbuilders;
use Illuminate\Support\ServiceProvider;

class FormServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     */
    public function boot()
    {
    }

    /**
     * Register the application services.
     */
    public function register()
    {
        $this->app->singleton('wangyongtao.form', function ($app) {
            $formBuilder = new FormBuilders();
            // $formBuilder->setErrorStore($app['adamwathan.form.errorstore']);
            // $formBuilder->setOldInputProvider($app['adamwathan.form.oldinput']);
            // $formBuilder->setToken($app['session.store']->token());
            return $formBuilder;
        });
        // $this->app->singleton(Connection::class, function ($app) {

        //     return new Connection(config('riak'));
        // });
    }
}
